<template>
	<text>
		<text class="price_font" :style="{'font-size': unitSize, color: unitColor || color , 'font-weight': weight}">¥</text>
		<text class="price_font" :style="{'font-size': size, color: color, 'font-weight': weight }">{{price | cent2Yuan}}</text>
		<template v-if="showOriginPrice">
			<text class="price_font" :style="{'font-size': originUnitSize, color: originUnitColor }">¥</text>
			<text :style="{'font-size': originSize, color: originColor }">{{originPrice | cent2Yuan}}</text>
		</template>
		<slot />
	</text>
</template>
<script>
export default {
	name: 'price',
	props: {
		price: { type:[String, Number], default:'0' },
		size: { type:String, default:'36rpx' },
		color: { type:String, default:'#1B2431' },
		weight:  { type:[String, Number], default:'500' },
		originPrice: { type:[String, Number], default:'0' },
		originSize: { type:String, default:'24rpx' },
		originColor: { type:String, default:'#1B2431' },
		unitSize: { type:String, default:'24rpx' },
		unitColor: { type:String, default:null },
		originUnitSize: { type:String, default:'24rpx' },
		originUnitColor: { type:String, default:'#1B2431' },
		showOriginPrice: { type:Boolean, default:false },
	},
}
</script>
<style lang="less">
.price_font{
	font-family: 'DIN-Bold'
}
</style>